package com.beans;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2022-10-09
 * Time: 11:02
 */
@Component
public class Users {

    @Bean
    public User user1(){
        User user = new User();
        user.setId(20);
        user.setName("MySQl");
        return user;
    }

    @Bean
    public User user2(){
        User user = new User();
        user.setId(10);
        user.setName("Java");
        return user;
    }


}
